
/**************************************************************************
 * Copyright (C) 2012 Marcin Kunicki <masel.popowo@gmail.com>
 * $LastChangedRevision: 44 $
 * $LastChangedBy: masel.popowo@gmail.com $
 * $LastChangedDate: 2012-10-29 11:14:29 +0000 (Mon, 29 Oct 2012) $
 * $HeadURL: http://pps-addressbook.googlecode.com/svn/tags/1.0-rc1/src/org/ewicom/ppsaddressbook/PPSAddressBook.java $
 *
 * This file is part of PPS-AddressBook.
 *
 * PPS-AddressBook is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * PPS-AddressBook is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with PPS-AddressBook; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 * 
 * Ten plik jest częścią PPS-AddressBook.
 * 
 * PPS-AddressBook jest wolnym oprogramowaniem; możesz go rozprowadzać dalej
 * i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU,
 * wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej
 * Licencji lub (według twojego wyboru) którejś z późniejszych wersji.
 * 
 * Niniejszy program rozpowszechniany jest z nadzieją, iż będzie on
 * użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej
 * gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH
 * ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do
 * Powszechnej Licencji Publicznej GNU.
 * 
 * Z pewnością wraz z niniejszym programem otrzymałeś też egzemplarz
 * Powszechnej Licencji Publicznej GNU (GNU General Public License);
 * jeśli nie - napisz do Free Software Foundation, Inc., 59 Temple
 * Place, Fifth Floor, Boston, MA  02110-1301  USA
 **************************************************************************/
package org.ewicom.ppsaddressbook;

import android.net.Uri;
import android.provider.BaseColumns;

public class PPSAddressBook {

	public static final String AUTHORITY = "org.ewicom.ppsaddressbook.provider.PPSAddressBook";

	private PPSAddressBook() {

	}

	/**
	 * 
	 * @author Marcin Kunicki Table unit
	 */
	public static final class UnitColumns implements BaseColumns {

		private UnitColumns() {

		}

		/**
		 * Content style Uri for Unit Table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ AUTHORITY + "/units");

		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of units.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ewicom.unit";

		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
		 * unit.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ewicom.unit";

		/**
		 * Default sort order for table unit (by name)
		 */
		public static final String DEFAULT_SORT_ORDER = "short_name ASC";

		public static final String UNIT_TABLE_NAME = "unit";

		/*****************************************************
		 * Definitions of Columns
		 */

		/**
		 * The name of unit
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String NAME = "name";

		/**
		 * The street of unit address
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String SHORT_NAME = "short_name";

		/**
		 * The street of unit address
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String STREET = "street";

		/**
		 * The postcode of unit address
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String POSTCODE = "postcode";

		/**
		 * The city of unit address
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String CITY = "city";

		/**
		 * Primary phone of unit
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String PHONE = "phone";

		/**
		 * Primary email of unit
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String EMAIL = "email";
	}

	/**
	 * 
	 * @author Marcin Kunicki Table person
	 * 
	 */
	public static final class PersonColumns implements BaseColumns {

		private PersonColumns() {

		}

		/**
		 * Content style Uri for Person Table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ AUTHORITY + "/persons");

		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of
		 * persons.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ewicom.person";

		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
		 * person.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ewicom.person";

		/**
		 * Default sort order for table person (by _id)
		 */
		public static final String DEFAULT_SORT_ORDER = "_id ASC";

		public static final String PERSON_TABLE_NAME = "person";

		/*****************************************************
		 * Definitions of Columns
		 */

		/**
		 * Foreign key from unit table
		 * <P>
		 * type: INTEGER
		 * </P>
		 */
		public static final String UNIT_ID = "unit_id";

		/**
		 * Position name of person
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String POSITION = "position";

		/**
		 * Person rank, name and surname
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String PERSON = "person";

		/**
		 * Person phone
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String PHONE = "phone";

		/**
		 * Person email
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String EMAIL = "email";

	}

	/**
	 * 
	 * @author Marcin Kunicki Table phone
	 * 
	 */
	public static final class PhoneColumns implements BaseColumns {

		private PhoneColumns() {

		}

		/**
		 * Content style Uri for phone Table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ AUTHORITY + "/phones");

		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of
		 * phones.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ewicom.phone";

		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
		 * phone.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ewicom.phone";

		/**
		 * Default sort order for table phone (by _id)
		 */
		public static final String DEFAULT_SORT_ORDER = "_id ASC";

		public static final String PHONE_TABLE_NAME = "phone";

		/*****************************************************
		 * Definitions of Columns
		 */

		/**
		 * Foreign key from unit table
		 * <P>
		 * type: INTEGER
		 * </P>
		 */
		public static final String UNIT_ID = "unit_id";

		/**
		 * Phone type
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String TYPE = "type";

		/**
		 * Phone number
		 * <P>
		 * type: TEXT
		 * </P>
		 */
		public static final String PHONE = "phone";
	}

}
